﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MyFramework.UIKit
{
	public enum UILayer
	{
		Bottom,
		Common,
		Top,
	}
	
	public class UIRoot : MonoBehaviour 
	{
		public Transform BottomLayer;
		public Transform CommonLayer;
		public Transform TopLayer;

		private static UIRoot mInstance;

		public static Transform Bottom
		{
			get
			{
				return mInstance.BottomLayer;
			}
		}

		public static Transform Common
		{
			get
			{
				return mInstance.CommonLayer;
			}
		}

		public static Transform Top
		{
			get
			{
				return mInstance.TopLayer;
			}
		}

		void Awake()
		{
			mInstance = this;
		}

		// Use this for initialization
		void Start () {

			MyResKit.ResMgr.Init ();

			UIPanel.OpenPanel<UIHomePanel> ();
		}
		// Update is called once per frame
		void Update () {

		}

		void OnDestroy()
		{
			mInstance = null;
		}
	}
}